<template>
  <el-form inline label-width="auto" size="medium" class="search-form">
    <el-form-item label="批次名称">
      <el-input v-model="search.stockName" class="search-input"></el-input>
    </el-form-item>
    <el-form-item label="门槛">
      <el-input-number v-model="search.transactionMinimumMin" class="number-input" :min="0" :max="search.transactionMinimumMax" :controls="false"
        :precision="0">
      </el-input-number>
      <span>-</span>
      <el-input-number v-model="search.transactionMinimumMax" class="number-input" :min="search.transactionMinimumMin?search.transactionMinimumMin:0"
        :controls="false" :precision="0">
      </el-input-number>
    </el-form-item>
    <el-form-item label="状态">
      <el-select clearable v-model="search.status" class="search-input">
        <el-option v-for="item in statusList" :key="item.value" :value="item.value" :label="item.label">
        </el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="是否停止">
      <el-select clearable v-model="search.stopStatus" class="search-input">
        <el-option v-for="item in stopStatusList" :key="item.value" :value="item.value" :label="item.label">
        </el-option>
      </el-select>
    </el-form-item>
  </el-form>
</template>

<script>
  export default {
    props: {
      search: {
        type: Object,
        required: true
      }
    },

    data() {
      return {
        statusList: this.i18n.getDropDown('couponMgr.status', [1, 0]),
        stopStatusList: this.i18n.getDropDown('couponMgr.stopStatus', [1, 0])
      };
    }
  };

</script>

<style lang="scss" scoped>
  @import '~viewStyle/searchForm';

  .search-form {
    .number-input {
      width: 100px;
    }
  }

</style>
